<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/displaytag-11.tld" prefix="display" %>

<script src="<%=request.getContextPath()%>/js/displaytag.js" type="text/javascript"></script>
  <!--SECCION DE MENSAJES DE ERROR INFORMACION PRECAUCION Y CONFIRMACION -->
  <!--MENSAJES DE INFORMACION  -->

<logic:messagesPresent message="true"> 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgInfor" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
  <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgError" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgWarn" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgOk" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
</logic:messagesPresent> 
 

<table width="99%"  border="0" cellpadding="0" cellspacing="0" widtd="100%">
  <!--TITULO DE LA CONSULTA -->
  <tr> 
    <td height="25" colspan="12" align="center" class="titulosenblanco"><strong> CRITERIOS DE BUSQUEDA DE OPCIONES DEL MENU</strong></td>
  </tr>
  
  <!--BOTON DE CREAR NUEVO REGISTRO  -->
  <tr align="left"> 
    <td height="25" colspan="12" class="titulosenblanco">
      <table width="99%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="right">
            <html:link page="/admin/newOption.do">
              <img src="<%= request.getContextPath() + "/images/b_nuevo.gif" %>" alt="Nuevo" width="22" height="22" border="0">
              <br>
              <span class="celdaayd">Nueva Opcion</span>
            </html:link>
          </td>
        </tr>
        <tr> 
          <td>&nbsp;</td>
        </tr>  
      </table>
    </td>		
  </tr>

  
  <!--CAMPOS DEL FORMULARIO PARA CONSULTA  -->
  
  <html:form action="/admin/findOption.do" focus="name">   
   <input type="hidden" name="search" value="search" />
  <tr align="left">
    <td width="100%" align="center"> <table width="70%" border="0" cellpadding="3" cellspacing="3">
  <!--CAMPO 1  -->
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Opcion</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" styleClass="form" property="name" maxlength="40"/></td>
          <td width="10%">&nbsp;</td>
        </tr>
  <!--CAMPO 2 
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Descripcion</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" styleClass="form" property="description" maxlength="40"/> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr> -->
  <!--CAMPO 3 (TIPO SELECT) -->
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Tipo de Opcion</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:select styleClass="form" property="optionType" style="width:215" > 
            <html:option value = "W" >Web</html:option>
            </html:select></td>
          <td width="10%">&nbsp;</td>
        </tr>
  <!--CAMPO 4  
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Opcion Padre</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" styleClass="form" property="fatherOptionName" maxlength="40"/> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>
  <!--CAMPO 5 
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Programa</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" value = "" styleClass="form" property="parentProgramName" maxlength="40"/> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>
  <!--CAMPO 6 
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Parametros</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" styleClass="form" property="parameters" maxlength="40"/> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>
  <!--CAMPO 8
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Orden</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" styleClass="form" property="order" maxlength="40" value=""/> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>-->
  <!--BOTON DE SUBMIT  -->
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%">&nbsp;</td>
          <td width="61%"><input type="submit" name="Submit" value="Buscar"> </td>
          <td width="10%">&nbsp;</td>
        </tr>
        <tr> 
          <td colspan="4">&nbsp;</td>
        </tr>
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%">&nbsp;</td>
          <td width="61%">&nbsp;</td>
          <td width="10%">&nbsp;</td>
        </tr>
      </table>
	</td>
  </tr>
</html:form> 	
  
   <tr>
    <td colspan="12" align="left">
      <logic:present name="msg">
        <div align="center"><%=request.getAttribute("msg")%></div>
      </logic:present>
    </td>
  </tr>
  
  <tr> 
    <td colspan="12" align="left">
  <!--ENCABEZADO DEL LISTADO EN CASO DE NO OBTENER REGISTROS  -->
       
       
  <!--LISTADO EN CASO DE OBTENER REGISTROS  -->
      <logic:present name="optionList"> 
      <%
        String style = "add";%>
  <!--ESPECIFICACION DE TABLA DEL LISTADO: PROGRAMAS  -->
        <display:table  name="requestScope.optionList"  pagesize="10" requestURI='<%= request.getContextPath() + "/admin/findOption.do" %>' class="bordesTable"  id="options"  cellpadding="3" cellspacing="1"  style="width:100%">
  <!--CAMPO: NUMERO (CONSECUTIVO)  -->
        
   <!--COLUMNA: NOMBRE (CON HIPERLINK)  -->
          <display:column headerClass="headerTable" title="Nombre" class="Numero" >
			      <html:link paramId="code" paramName="options" paramProperty="code" page="/admin/modifyOption.do">
              <bean:write name="options" property="name" /> 	
            </html:link>
          </display:column>		
  <!--COLUMNA: TIPO OPCION  -->
          <display:column headerClass="headerTable" title="Tipo de Opcion" class="Numero" >
						<bean:write name="options" property="optionType" /> 
          </display:column>											
  <!--COLUMNA: PADRE  -->
          <display:column headerClass="headerTable" title="Padre" class="Numero" >
						<bean:write name="options" property="fatherOptionName" /> 
          </display:column>
 <!--COLUMNA: PARAMETROS   -->
          <display:column headerClass="headerTable"  title="Parametros" class="Numero" >
						<bean:write name="options" property="parameters" /> 
          </display:column>
  <!--COLUMNA: ORDEN   -->
          <display:column headerClass="headerTable" title="Orden" class="Numero" >
						<bean:write name="options" property="order" /> 
          </display:column>
  <!--COLUMNA: borrar   -->
     
        

        </display:table>
      </logic:present>
		</td>
  </tr>
  </table>